#include <iostream>
using namespace std;
int main(int argc, char **argv)
{
	const float mile2kilometer = 1.6093;//constant variable
	float kilometers;
	kilometers = 0;
	int miles = 10;
	//way one
	for(int i = 0; i < miles; i++) {
		kilometers += mile2kilometer;
	}
	//way two
	kilometers = miles * mile2kilometer;

	//output
	cout << miles << " miles are " << kilometers << " kilometers" << endl;

	//mile2kilometer = 100; error
	miles = 9;//ok
	kilometers = miles * mile2kilometer;
	cout << miles << " miles are " << kilometers << " kilometers" << endl;

	//transform
	int i = kilometers;
	cout << "size of integer is\t" << sizeof(i) << " bytes" << endl;
	cout << "size of float is\t" << sizeof(float) << " bytes" << endl;
	cout << "kilometers value is\t " << kilometers << endl;
	cout << "i value is " << i << endl;

	//system("pause");//you can try to remove "//" in the beginning
	return 0;
}
